<?php

class Default_SaleController extends Zend_Controller_Action
{
    
    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
        // action body
        $mdProd = new Application_Model_DbTable_Product();    
        $this->view->headTitle("Sale")->setSeparator(" | ");
        
        $adapter = $mdProd->fetchPaginatorAdapter(array("isSale"=>1),"update","desc");        
        //Show
        $paginator = new Zend_Paginator($adapter);
        $paginator->setItemCountPerPage(18);
        $page = $this->_request->getParam("page",1);
        $paginator->setCurrentPageNumber($page);
        
        $this->view->datas = $paginator;
    }

}

